package com.xyoto.community.controller;


import com.xyoto.community.service.ProverbService;
import com.xyoto.community.utils.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


@Api(tags = "每日金句（前台)")
@RestController
@RequestMapping("/proverb")
public class ProverbController {

    @Autowired
    private ProverbService proverbService;

    /**
     * 获取今日金句
     * @author 廖振辉
     * @return {@link Result}
     */
    @ApiOperation("获取每日金句")
    @GetMapping("/getOne")
    public Result getTodayProverb(){
       return proverbService.getOne();
    }

}
